
import java.awt.Color;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.net.URL;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.plaf.IconUIResource;


public class Label {
    public JLabel label;
    public boolean  presionado=false;
    public int cantidad_imagenes;
    public Label(String txt, int Cantidad_imagenes) {
        label=new JLabel(txt);
        label.setBorder(BorderFactory.createTitledBorder(""));
        cantidad_imagenes=Cantidad_imagenes;
       
    }
    public void setIcono(String path)
    {
        label.setIcon(new ImageIcon(getClass().getResource(path)));
    }

    public int getCantidad_imagenes() {
        return cantidad_imagenes;
    }

    public void setCantidad_imagenes(int cantidad_imagenes) {
        this.cantidad_imagenes = cantidad_imagenes;
    }
    public void setTexto(String txt)
    {
        label.setText(txt);
    }
    public String getTexto()
    {
        return label.getText();
    }
    public int getPuntaje()
    {
        return Integer.parseInt(label.getText());
    }
    public void getEvent(){ 
        MouseListener ml=new MouseListener() {

            @Override
            public void mouseClicked(MouseEvent e) {
               
                presionado=true;
                
            }

            @Override
            public void mousePressed(MouseEvent e) {
                
            }

            @Override
            public void mouseReleased(MouseEvent e) {
                presionado=false;
                
            }

            @Override
            public void mouseEntered(MouseEvent e) {
               
            }

            @Override
            public void mouseExited(MouseEvent e) {
               
            }
        };
        label.addMouseListener(ml);
    }
    } 
    
    

